import request from "@/utils/request";

export function luckyAdd(data) {
  return request({
    url: "/api/lucky/add",
    method: "POST",
    data
  })
}

export function luckInfo() {
  return request({
    url: "/api/lucky/info",
    method: "GET"
  })
}

/**
 * 增加抽奖
 * @param data
 * @returns {AxiosPromise}
 */
export function luckAdd(data) {
  return request({
    url: "/api/lucky/add",
    method: "POST",
    data
  })
}

export function mylucky(params) {
  return request({
    url: "/api/lucky/mylucky",
    method: "GET",
    params
  })
}

export function myAllLuckyWin(params){
  return request({
    url: "/api/lucky/myAllLuckyWin",
    method: "GET",
    params
  })
}

export function myLuckWin(params){
  return request({
    url: "/api/lucky/myLuckyWin",
    method: "GET",
    params
  })
}

export function getMyJoin(params){
  return request({
    url:"/api/lucky/getMyJoin",
    method: "GET",
    params
  })
}

/**
 * 获取活动详情页面
 * @param params
 * @returns {AxiosPromise}
 */
export function luckInfoById(id){
  return request({
    url:`api/lucky/info/${id}`,
    method: "GET"
  })
}

export function lottery(id){
  return request({
    url: `api/lucky/lottery/${id}`
  })
}
